package com.ding.eduservice.client;

import com.ding.commonutils.Result;
import com.ding.eduservice.client.impl.Hystriximpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "service-vod",fallback = Hystriximpl.class)
public interface VodClient {
    //定义调用方法的路径
    @DeleteMapping("/eduvod/video/delVideo/{videoId}")
    public Result delVideo(@PathVariable("videoId") String videoId);

    //删除所有小节中的视频
    @DeleteMapping("/eduvod/video/deletevideo/delete")
    public Result deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
